import { react, useState } from "react"

function FunComponent() {

    let [show, changeShow] = useState(false)
    function showTable() {
        if (show) {
            return <div>123</div>
        }
    }
    function clickButton() {
        let _show = !show
        changeShow(_show)
    }
    return (
        <div>
            {showTable()}
            <button onClick={clickButton}>{show ? "隐藏" : "显示"}</button>
        </div>

    )
}
export default FunComponent;